﻿<UserControl x:Class="HOG.Controls.FrameControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:beh="clr-namespace:HOG.Behaviors"
    xmlns:shaders="clr-namespace:HOG.Shaders"
    xmlns:cust="clr-namespace:BaseControls;assembly=BaseControls"
    xmlns:ii="clr-namespace:Microsoft.Expression.Interactivity.Input;assembly=Microsoft.Expression.Interactions"
    xmlns:hog="clr-namespace:HOG.Controls"
    xmlns:im="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"	
    Width="900" Height="600" >
    <UserControl.Resources>
        <Storyboard x:Name="BCGClose">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="BCG">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="-620"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="-460.102"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="BCG">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="-136"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="-117.623"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="BCG">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="-5.799"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="MainMenuShow">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MainMenu" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1.141"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MainMenu" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1.141"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00.0000000" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MainMenu">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.0000000">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="MainMenuClose">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="MainMenu">
                <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.141"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="MainMenu">
                <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.141"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00.0000000" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MainMenu">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.0000000">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="BlackScreenShow">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BlackScreen" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="2.607"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BlackScreen" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="2.607"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="BlackScreen" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00.0000000" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BlackScreen">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.0000000">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="BlackScreenClose">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="BlackScreen">
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="2.607"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="BlackScreen">
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="2.607"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BlackScreen">
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00.6000000" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BlackScreen">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.6000000">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="InterfaceClose">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Interface" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="222"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Interface" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00.0000000" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Interface">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.0000000">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="InterfaceShow">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Interface" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="-222"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.1000000" Value="-237"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.5"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Interface" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00.0000000" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Interface">
                <DiscreteObjectKeyFrame KeyTime="00:00:00.0000000">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Border Width="900" Height="600">
        <Canvas x:Name="RootControl" Background="White" Width="900" Height="600">
            <i:Interaction.Triggers>
                <ii:KeyTrigger FiredOn="KeyDown" Key="P">
                    <beh:PauseBehavior />
                </ii:KeyTrigger>
                <ii:KeyTrigger FiredOn="KeyDown" Key="Escape">
                    <beh:PauseBehavior />
                </ii:KeyTrigger>
            </i:Interaction.Triggers>
            <Image Visibility="Visible" Height="600" Width="900" Canvas.Top="0" Source="/HOG;Component/Images/Interface/Tlo.png" Stretch="Fill"/>
            <Canvas x:Name="BlackScreen" Height="600" Width="900" RenderTransformOrigin="0.5,0.5">
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Canvas.RenderTransform>
                <Canvas.OpacityMask>
                    <RadialGradientBrush RadiusY="0.64">
                        <GradientStop Color="#41000000" Offset="0"/>
                        <GradientStop Color="#D7FFFFFF" Offset="1"/>
                    </RadialGradientBrush>
                </Canvas.OpacityMask>
                <Rectangle Fill="Black" Stroke="Black" Height="600" Width="900" Canvas.Left="0" Canvas.Top="0"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="10"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="25"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="40"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="55"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="70"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="85"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="100"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="115"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="130"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="145"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="160"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="175"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="190"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="205"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="220"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="235"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="250"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="265"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="280"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="295"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="310"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="325"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="340"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="355"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="370"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="385"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="400"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="415"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="430"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="445"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="460"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="475"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="490"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="505"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="520"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="535"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="550"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="565"/>
                <Rectangle Fill="#15FFFFFF" Height="5" Width="900" Canvas.Left="0" Canvas.Top="580"/>
            </Canvas>
            <Image x:Name="music" Source="/HOG;Component/Images/Interface/MusicOn.png" Canvas.ZIndex="100" Canvas.Top="10" Canvas.Left="850" MouseLeftButtonDown="ChangeMusicState" />
            <Border>
                <Border.Effect>
                    <shaders:BrightnessEffect x:Name="brightness" Brightness="0" />
                </Border.Effect>
                <Border>
                    <Border.Effect>
                        <shaders:ContrastEffect x:Name="contrast" Contrast="1" />
                    </Border.Effect>
                    <Border>
                        <Border.Effect>
                            <shaders:GammaEffect x:Name="gamma" Gamma="1" />
                        </Border.Effect>

                        <Canvas x:Name="content">
                        </Canvas>

                    </Border>
                </Border>
            </Border>
        </Canvas>
    </Border>
</UserControl>
